package com.zsy.servlet;


import java.io.IOException;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zsy.service.BBSService;

public class DeletePrefix extends HttpServlet {

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		String id = req.getParameter("id");
		String prefixId = req.getParameter("prefixId");
		BBSService bbss = new BBSService();
		try {
			bbss.deletePrefix(id, prefixId);
			req.getSession().setAttribute("msg","删除成功！");
			resp.sendRedirect(req.getContextPath()+"/allPrefixConf");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
